<?php
namespace yakexi;

class Template
{
	public static function render($path, $values=array())
	{
		if (!file_exists($path))
			die("template file: $path not exists.");

		if (count($values) > 0)
			extract($values);

		ob_start();
		include($path);
		$output = ob_get_contents();
		ob_end_clean();

		return $output;
	}
}
